package com.example;

import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.web.support.SpringBootServletInitializer;

/**
 * TomCat容器入口类
 * 当前工程Servlet启动的初始化子类，需要覆盖父类的configure方法，保证初始化第三方容器启动能正确找到入口
 */
public class WebTomcatStarter extends SpringBootServletInitializer {
    @Override
    protected SpringApplicationBuilder configure(SpringApplicationBuilder builder) {
        return builder.sources(WebTomcatStarter.class);
    }
}
